package file;

import java.io.File;
import java.util.Arrays;

/**
 * Creared with IntelliJ IDEA.
 * Description:
 * User:yxd
 * Date:2022-04-05
 * Time:18:54
 */
public class Demo6 {
    public static void main(String[] args) {
        File f = new File("./");
        System.out.println(Arrays.toString(f.list()));//查看此目录下的内容(列出目录内容)
        System.out.println(Arrays.toString(f.listFiles()));//按照file对象的方法打印
    }
}
